<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div style="display: flex;text-align: center;justify-content: space-around">

    <table border="1" width="400">
        <caption>学生列表</caption>
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td style="width: 100px">操作</td>
        </tr>
        <tr th:each="student:${students}">
            <td th:text="${student.id}"></td>
            <td th:text="${student.name}"></td>
            <td style="display: flex;">
                <a style="width: 50%" th:href="@{student/deleteStudentById(id=${student.id})}">删除</a>
                <a style="width: 50%" th:href="@{student/updateStudentPage(id=${student.id})}">修改</a>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <a style="width: 100%" th:href="@{/student/addPage}">添加</a>
            </td>
        </tr>
    </table>

    <table border="1" width="600">
        <caption>员工列表</caption>
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>地址</td>
            <td>薪水</td>
            <td>部门</td>
            <td style="width: 100px">操作</td>
        </tr>
        <tr th:each="epm:${emps}">
            <td th:text="${epm.id}"></td>
            <td th:text="${epm.name}"></td>
            <td th:text="${epm.address}"></td>
            <td th:text="${epm.salary}"></td>
            <td th:text="${epm.dept.getDName()}"></td>
            <td style="display: flex">
                <a style="width: 50%" th:href="@{/emp/deleteEmpById(id=${epm.id})}">删除</a>
                <a style="width: 50%" th:href="@{/emp/updateEmpPage(id=${epm.id})}">修改</a>
            </td>
        </tr>
        <tr>
            <td colspan="6">
                <a style="width: 100%" th:href="@{/emp/addEmpPage}">添加</a>
            </td>
        </tr>
    </table>

</div>

<div style="text-align: center;margin-top: 50px">
    <a th:href="@{/file/uploadPage}">上传文件</a>
    <a th:href="@{/file/showFile}">查看文件</a>
</div>
</body>
</html>